]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbusServices/extensions: Mention website in description
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 22 May 2025 01:53:43 +0000 (03:53 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 1 Aug 2025 08:57:44 +0000 (08:57 +0000)
If the extension specifies a website, mention it in the description
instead of having a dedicated button in the expander toolbar.

This will allow us to get rid of the toolbar altogether soon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3750>

js/dbusServices/extensions/extensionPrefsDialog.js
js/dbusServices/extensions/ui/extension-error-page.ui

index 01d6258f2ec77f6dd9b45295a535000a77afe589..9be0e6f4f7eef720d62d85754445d54741cef18d 100644 (file)
@@ -97,9 +97,6 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage {
                 const clipboard = self.get_display().get_clipboard();
                 clipboard.set(self._errorMarkdown);
             });
-        this.install_action('page.show-url',
-            null,
-            self => Gtk.show_uri(self.get_root(), self._url, Gdk.CURRENT_TIME));
     }
 
     constructor(extension, error) {
@@ -109,14 +106,22 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage {
 
         const {uuid, name, url} = extension.metadata;
 
-        this._url = url;
-
-        this.action_set_enabled('page.show-url', this._url !== '');
-
-        const label =
+        let label =
             /* Translators: %s is an extension name */
             _('Unable to display the settings for “%s”.')
                 .format(GLib.markup_escape_text(name, -1));
+
+        if (url) {
+            /* Translators: Link label in the phrase "Information about this
+               problem may be available on the extension website" */
+            const linkLabel = _('extension website');
+
+            label += ' ';
+            /* Translators: %s is "extension website" */
+            label += _('Information about this problem may be available on the %s.')
+                .format(`<a href="${url}">${linkLabel}</a>`);
+        }
+
         this._descriptionLabel.set({label});
 
         this._gesture = new Gtk.GestureClick({
index 7648eb42836068a2ca7b8a6ef36e221f8e0faf6e..12ed9fb845c3ebb4b235fd8cef99fa1c8ee2b718 100644 (file)
                                     <property name="tooltip-text" translatable="yes">Copy Error</property>
                                   </object>
                                 </child>
-                                <child>
-                                  <object class="GtkButton" id="homeButton">
-                                    <property name="visible"
-                                              bind-source="homeButton"
-                                              bind-property="sensitive"
-                                              bind-flags="sync-create"/>
-                                    <property name="hexpand">True</property>
-                                    <property name="halign">end</property>
-                                    <property name="label" translatable="yes">Homepage</property>
-                                    <property name="tooltip-text" translatable="yes">Visit extension homepage</property>
-                                    <property name="receives-default">True</property>
-                                    <property name="has-frame">False</property>
-                                    <property name="action-name">page.show-url</property>
-                                  </object>
-                                </child>
                               </object>
                             </child>
                           </object>